'use strict';

/**
 * webot middleware
 * @param  {Object} opts options
 * @return {Function} ES6 generator function
 */
module.exports = function(opts) {
  var middleware = function *myRob(next) {
    // wait initRob();
    yield opts.wechatCtrl.initRob();
    yield next;
  };
  return middleware;
};
